//api进行统一管理
import requests from './request'

import mockRequests from './mockAjax'
//三级联动的接口
// /api/product/getBaseCategoryList   get  无参数

export const reqCategoryList = () => requests({ url: '/product/getBaseCategoryList', method: 'get' })

//获取banner（Home首页轮播图接口）
export const reqBannerList =() =>mockRequests('/banner')

//获取floor
export const reqFloorList = () =>mockRequests('/floor')

//获取搜索模块数据  地址: /api/list  请求方式post 需要带参数
/*
{
    "category3Id": "61",
    "categoryName": "手机",
    "keyword": "小米",
    "order": "1:desc",
    "pageNo": 1,
    "pageSize": 10,
    "props": ["1:1700-2799:价格", "2:6.65-6.74英寸:屏幕尺寸"],
    "trademark": "4:小米"
  }
  */
 export const reqGetSearchInfo = (params) => requests({url:'/list ',method:'post',data:params})



 //获取验证码
 export const reqGetCode = (phone) => requests({url:`/user/passport/sendCode/${phone}`,method:'get'})

 //注册
 export const reqUserRegister =(data) => requests({url:`/user/passport/register`,method:'post',data})

 //登录
 export const reqUserLogin = (data) => requests({url:`/user/passport/login`,method:'post',data})